#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	int n;
	scanf("%d", &n);
	int N;
	for (int i = 0; i < n; i++) {
		scanf("%d", &N);
		int *grades = new int[N];
		int sum = 0;
		for (int j = 0; j < N; j++) {
			scanf("%d", grades + j);
			sum += grades[j];
		}
		double average = (double)sum / N;
		int greater = 0;
		for (int j = 0; j < N; j++) {
			if ((double)grades[j] > average) 
				++greater;
		}
		double percentage = (double)greater / N * 100.0;
		printf("%.3lf%%\n", percentage);
		delete[] grades;
	}
	return 0;
}